package com.google.code.guava.reflect.predicate;

import java.util.Collection;

enum QualifierEvalutionStrategy{
    CONTAINS_ALL{

        @Override
        public boolean evaluate(final Collection<Qualifier> knownModifiers,
            final int presentModifiers){
            for(final Qualifier modifier : knownModifiers){
                if(modifier.isAbsent(presentModifiers)) return false;
            }
            return true;
        }
    },
    CONTAINS_ANY{

        @Override
        public boolean evaluate(final Collection<Qualifier> knownModifiers,
            final int presentModifiers){
            for(final Qualifier modifier : knownModifiers){
                if(modifier.isPresent(presentModifiers)) return true;
            }
            return false;
        }
    },
    CONTAINS_NONE{

        @Override
        public boolean evaluate(final Collection<Qualifier> knownModifiers,
            final int presentModifiers){
            for(final Qualifier modifier : knownModifiers){
                if(modifier.isPresent(presentModifiers)) return false;
            }
            return true;
        }
    };

    public abstract boolean evaluate(Collection<Qualifier> knownModifiers,
        int presentModifiers);

}
